<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$title}</title>
    <meta name="keywords" content="{$title}">
    <meta name="description" content="{$title}">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__STATICADMIN__/css/bootstrap.min14ed.css" rel="stylesheet">
    <link href="__STATICADMIN__/css/font-awesome.min93e3.css" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__STATICADMIN__/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="__STATICADMIN__/css/animate.min.css" rel="stylesheet">
    <link href="__STATICADMIN__/css/style.min.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>文章分类表</h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-2">
                            <div class="input-group">
                                <a href="{:U('add')}" class="btn btn-outline btn-primary ">添加文章分类</a>
                            </div>
                        </div>
                    </div>
                    <div class="hr-line-dashed" style="margin: 10px"></div>
                    <table class="table table-striped table-bordered table-hover dataTables-example">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>分类名称</th>
                            <th>子ID</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="list" id="v">
                            <tr class="gradeA">
                                <td>{$v.id}</td>
                                <td>{$v.category}</td>
                                <td>{$v.pid}</td>
                                <td><a href="javascript:;" class="btn btn-primary btn-xs" onclick="edit({$v.id})"><i class="fa fa-edit"></i> 编辑</a>&nbsp;&nbsp;
                                    <a href="javascript:;" class="btn btn-danger btn-xs" onclick="del({$v.id})"><i class="fa fa-trash-o"></i> 删除</a></td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="__STATICADMIN__/js/jquery.min.js"></script>
<script src="__STATICADMIN__/js/bootstrap.min.js"></script>
<script src="__STATICADMIN__/js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="__STATICADMIN__/js/common.js"></script>
<script src="__STATIC__/public/layui/lay/dest/layui.all.js"></script>
<!-- 自定义js -->
<script src="__STATICADMIN__/js/content.min.js"></script>
<script>
    function  del(id){
        sxshop.del(id,"{:U('del')}","{:U()}");
    }
    function edit(id){
        location.href='/admin/category/edit/id/'+id+'.html';

    }
</script>

</body>

</html>